<?php if (!defined('THINK_PATH')) exit(); echo W('Header');?>
<div class="list-div" id="listDiv">
    <br>
    <br>
    <table width="90%" style="margin: 0 auto" >
        <tr style="font-size: 15px;background-color: #78C3F3;height: 40px">
            <th style="">订单号</th>
            <th>支付方式</th>
            <th>支付状态</th>
            <th>时间</th>
            <th>订单总金额</th>
            <th>订单状态</th>
            <th>操作</th>
        </tr>
        <tr><td>&nbsp;</td></tr>
        <?php if(is_array($orderArr)): foreach($orderArr as $key=>$v): ?><tr align="center" style="height: 30px;font-size: 15px;">
                <td>
                    <a href="<?php echo U(GROUP_NAME.'/Order/orderInfo',array('orderId'=>$v['id']));?>" style="color: #0d3c4d;font-weight: bold"><?php echo ($v["order_sn"]); ?></a>
                </td>
                <td><?php echo ($v["payment"]); ?></td>
                <td><?php echo ($v["pay_status"]); ?></td>
                <td>
                    <?php if($v["pay_time"] ): echo (date("Y-m-d H:i:s",$v["pay_time"])); ?>
                        <?php else: ?>
                        <?php echo (date("Y-m-d H:i:s",$v["add_time"])); endif; ?>
                </td>
                <td><?php echo ($v["total"]); ?>元</td>
                <td><?php echo ($v["order_status"]); ?></td>
                <td>
                    <?php if(($v["order_status"] == '未确认') AND ($v["pay_status"] == '未支付') ): ?><form action="<?php echo U(GROUP_NAME.'/Order/cancel');?>" method="post">
                            <input type="hidden" name="orderId" value="<?php echo ($v['id']); ?>">
                            <input type="submit" value="取消" style="width:60px" >
                        </form>

                    <?php else: ?>
                        无法取消<?php endif; ?>
                </td>
            </tr><?php endforeach; endif; ?>
    </table>
</div>
<?php echo W('Footer');?>